﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class admin_ads_manage : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            //显示类型
            if (e.Row.Cells[3].Text == "1")
            {
                e.Row.Cells[3].Text = "图片";
            }
            else if (e.Row.Cells[3].Text == "2")
            {
                e.Row.Cells[3].Text = "Flash";
            }
            else if (e.Row.Cells[3].Text == "3")
            {
                e.Row.Cells[3].Text = "文字";
            }
            else if (e.Row.Cells[3].Text == "4")
            {
                e.Row.Cells[3].Text = "代码";
            }

            //显示是否开放
            if (e.Row.Cells[6].Text == "True")
            {
                e.Row.Cells[6].Text = "<font color='red'>√</font>";
            }
            else
            {
                e.Row.Cells[6].Text = "×";
            }

            //显示是否租用
            if (e.Row.Cells[7].Text == "True")
            {
                e.Row.Cells[7].Text = "<font color='red'>√</font>";
            }
            else
            {
                e.Row.Cells[7].Text = "×";
            }

        }

    }
}
